<?php

class Input_Message extends \SF\Input
{
    public function init()
    {   
        // 内容
        $this->addItem('content', array(
            'filters' => array('stringTrim', 'deQuote'),
            'validators' => array(
                array('validator' => 'notEmpty', 'message' => '请填写您的留言内容'),
            ),
        ));

        // 姓名
        $this->addItem('name', array(
            'filters' => array('stringTrim', 'deQuote'),
            'validators' => array(
                array('validator' => 'notEmpty', 'message' => '请填写您的姓名'),
            ),
        ));

        // 电话
        $this->addItem('phone', array(
            'filters' => array('stringTrim', 'deQuote'),
            'validators' => array(
                array('validator' => 'notEmpty', 'message' => '请留下您的联系电话'),
            ),
        ));

        // 地址
        $this->addItem('address', array(
            'filters' => array('stringTrim', 'deQuote'),
        ));

        // 邮箱
        $this->addItem('email', array(
            'filters' => array('stringTrim', 'deQuote'),
        ));
    }

}